<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <div class="layui-form-item">
            <label class="layui-form-label">商品分类</label>
            <div class="layui-input-block">
                <select name="cate_id" lay-verify="required">
                    {foreach name="cats" item="val"}
                    <option value="{$val.id}" {if condition="$row['cate_id']==$val['id']"}selected{/if}>{$val.title}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入商品标题" value="{$row.title|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题描述</label>
            <div class="layui-input-block">
                <input type="text" name="title_desc" class="layui-input" lay-verify="required" placeholder="请输入商品标题" value="{$row.title_desc}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属商家</label>
            <div class="layui-input-block">
                <select name="cate_id" lay-verify="required">
                    {foreach name="manager" item="val"}
                    <option value="{$val.id}" {if condition="$row['manager_id']==$val['id']"}selected{/if}>{$val.title}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">商品封面</label>
            <div class="layui-input-block layuimini-upload">
                <input name="logo" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传封面" value="{$row.logo|default=''}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="logo" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_logo" data-upload-select="logo" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">商品图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="images" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传商品图片" value="{$row.images|default=''}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="images" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_images" data-upload-select="images" data-upload-number="more" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">市场价格</label>
            <div class="layui-input-block">
                <input type="text" name="market_price" class="layui-input" lay-verify="required" placeholder="请输入市场价格" value="{$row.market_price|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商品价格</label>
            <div class="layui-input-block">
                <input type="text" name="goods_price" class="layui-input" lay-verify="required" placeholder="请输入折扣价格" value="{$row.goods_price|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">虚拟销量</label>
            <div class="layui-input-block">
                <input type="text" name="virtual_sales" class="layui-input" lay-verify="required" placeholder="请输入虚拟销量" value="{$row.virtual_sales|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商品描述</label>
            <div class="layui-input-block">
                <textarea name="description" rows="20" class="layui-textarea editor" placeholder="请输入商品描述">{$row.description|raw|default=''}</textarea>
            </div>
        </div>
        {if condition="$row['apply_status']==0"}
        <div class="layui-form-item">
            <label class="layui-form-label">审核结果</label>
            <div class="layui-input-block" style="display: flex">
                <div style="display: flex;justify-content: center">
                    <input type="radio" name="apply_status" class="layui-input"  checked  value="1">
                    <span style="line-height: 36px;">审核通过</span>
                </div>
                <div style="display: flex;justify-content: center;padding-left: 20px;">
                    <input type="radio" name="apply_status" class="layui-input"  value="2">
                    <span style="line-height: 36px;">审核拒绝</span>
                </div>
            </div>
        </div>
        {else/}
        <div class="layui-form-item">
            <label class="layui-form-label">审核结果</label>
            <div class="layui-input-block" style="display: flex">
                {if condition="$row['apply_status']==1"}
                <div style="display: flex;justify-content: center">
                    <input type="radio" name="apply_status" class="layui-input"  checked  value="1">
                    <span style="line-height: 36px;">审核通过</span>
                </div>
                {/if}
                {if condition="$row['apply_status']==2"}
                <div style="display: flex;justify-content: center;padding-left: 20px;">
                    <input type="radio" name="apply_status" class="layui-input"  checked   value="2">
                    <span style="line-height: 36px;">审核拒绝</span>
                </div>
                {/if}
            </div>
        </div>
        {/if}
        <div class="layui-form-item">
            <label class="layui-form-label">审核意见</label>
            <div class="layui-input-block">
                <textarea name="apply_reason" class="layui-textarea" placeholder="请输入审核意见" >{$row['apply_reason']}</textarea>
            </div>
        </div>

        <div class="hr-line"></div>
        {if condition="$row['applystatus']==0"}
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>
        {/if}
    </form>
</div>
<script>
    var mid ='{$mid}';
</script>